package com.gitee.sxc25800.cai;


public class Sheep {
     private int id = 2;
     private String name = "sheep";
     private String color = "white";
     private int age = 2;
     private String food = "grass";
     private String location = "西伯利亚";

     public void setInfo(String name,int age,String food,String color,String location){
          this.name = name;
          this.color = color;
          this.age = age;
          this.food = food;
          this.location = location;
     }

     public String getColor() {
          return color;
     }

     public int getAge() {
          return age;
     }

     public String getFood() {
          return food;
     }


     public String getLocation() {
          return location;
     }


     @Override
     public String toString() {
          return "Sheep(" + id + ")\n" +
                  "名字 = " + name + '\n' +
                  "颜色 = " + color + '\n' +
                  "年龄 = " + age + '\n' +
                  "食物 = " + food + '\n' +
                  "居住地 = " + location;
     }
}